<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition template="/template/templateLogin.xhtml"
                xmlns="http://www.w3.org/1999/xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                xmlns:p="http://primefaces.org/ui">
    <ui:define name="content">  
        <form 
            action="#{request.contextPath}/j_spring_security_check" 
            method="post">
            <br/>
            <div align="center">
                <center>
                    <h:outputText rendered="#{param.error}"
                                  value="Erro ao efetuar login!"
                                  style="color: darkred"/>
                </center>
                <p:messages 
                    id="mLogin" 
                    showSummary="true"/>
                <p:panel 
                    id="panelLogin"
                    header="Bem vindo(a) ao Açai."
                    style="width: 600px">
                    <h:panelGrid  id="gridLogin"  columns="2">

                        <h:outputText id="loginLabel" value="E-mail:"/>
                        <p:inputText required="true" id="j_username"/>

                        <h:outputText value="Senha: " />  
                        <p:password required="true" id="j_password" /> 


                    </h:panelGrid>
                    <p:panel style="border-color: transparent; color: transparent; background: transparent " >
                        <div align="center">
                            <h:commandButton
                                value="Entrar"/>
                        </div>
                    </p:panel>
                </p:panel>
            </div>
        </form>
        <h:form>
            <div align="center">
                <h:outputLabel
                    value="Criar uma Conta?"
                    style="font-size: 16px"
                    for="clClick"/>
                <h:commandLink
                    id="clClick"
                    style="color: blue; font-size: 16px"
                    value="Clique Aqui!"
                    action="/acesso/cadastro/formulario.jsf"/>
            </div>
            <br/>
        </h:form>
        <br/>
    </ui:define>
</ui:composition>

